#pragma once
#include <iostream>
#include <string>
#include <cstring>
#include <cassert>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

#define NAMED_PIPE "/tmp/mypipe"

void createFifo(const std::string &path)
{
    umask(0);
    int n = mkfifo(path.c_str(),0600);
    assert(n == 0);
    (void)n;
}

void removeFifo(const std::string &path)
{
    int n = unlink(path.c_str());
    assert(n == 0);
    (void)n;
}